/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package exatrez.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Mansur
 */
@Entity
@Table(name = "ship_visit3se_file")
@NamedQueries({
    @NamedQuery(name = "ShipVisit3SubExtendFile.findAll", query = "SELECT s FROM ShipVisit3SubExtendFile s")})
public class ShipVisit3SubExtendFile implements Serializable{
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "sv3se_File_id")
    private Integer shipVisit3SubExtFileId;
    
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "ship_visit3se_id")
    private ShipVisit3SubExtend shipVisit3SubExtend;
    
    @Column(name = "document_path")
    private String documentPath;
    
    @Column(name = "content_type")
    private String contentType;
    
    @Column(name = "title")
    private String title;
    
    @Column(name = "delete_flag")
    private String deleted;
    
    @Embedded
    private InfoAudit infoAudit;
    
    public ShipVisit3SubExtendFile(){
        
    }

    public Integer getShipVisit3SubExtFileId() {
        return shipVisit3SubExtFileId;
    }

    public void setShipVisit3SubExtFileId(Integer shipVisit3SubExtFileId) {
        this.shipVisit3SubExtFileId = shipVisit3SubExtFileId;
    }

    public ShipVisit3SubExtend getShipVisit3SubExtend() {
        return shipVisit3SubExtend;
    }

    public void setShipVisit3SubExtend(ShipVisit3SubExtend shipVisit3SubExtend) {
        this.shipVisit3SubExtend = shipVisit3SubExtend;
    }

    public String getDocumentPath() {
        return documentPath;
    }

    public void setDocumentPath(String documentPath) {
        this.documentPath = documentPath;
    }

    public String getContentType() {
        return contentType;
    }

    public void setContentType(String contentType) {
        this.contentType = contentType;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDeleted() {
        return deleted;
    }

    public void setDeleted(String deleted) {
        this.deleted = deleted;
    }

    public InfoAudit getInfoAudit() {
        return infoAudit;
    }

    public void setInfoAudit(InfoAudit infoAudit) {
        this.infoAudit = infoAudit;
    }
    
    @Override
    public int hashCode() {
        int hash = 0;
        hash += (shipVisit3SubExtFileId != null ? shipVisit3SubExtFileId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ShipVisit3SubExtendFile)) {
            return false;
        }
        ShipVisit3SubExtendFile other = (ShipVisit3SubExtendFile) object;
        if ((this.shipVisit3SubExtFileId == null && other.shipVisit3SubExtFileId != null) || (this.shipVisit3SubExtFileId != null && !this.shipVisit3SubExtFileId.equals(other.shipVisit3SubExtFileId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "exatrez.model.ShipVisit3SubExtendFile[ shipVisit3SubExtFileId=" + shipVisit3SubExtFileId + " ]";
    }
}
